<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加</title>
    <script src="/static/jquery-1.11.3.js"></script>

</head>
<body>
    账号<input type="text" name="username" id="username">
    密码<input type="password" name="password" id="password">
    年龄<input type="text" name="age" id="age">
    <button id="login">提交</button>
</body>
<script>
    $(function () {
        $('#login').click(function () {
            var $usernameInput = $('#username');
            var $passwordInput = $('#password');
            var $ageInput = $('#age')
            var u = $usernameInput.val();
            var p = $passwordInput.val();
            var a = $ageInput.val()
            var param = {username: u, password: p,age:a};
            console.log(param);
            $.get('/tianjia', param, function () {

            })
        })
    })
</script>
</html>